# 班上投票竞选，将选择票数最高的同学担任班长，请你设计一个投票系统，输入名字即可投票，最后统计大家的得票数，公开投票结果，并宣布谁担任班长
students = {"小明": 0,"小红": 0,"小白": 0,"小希": 0}
count = 0
while count < 5:
    name = input("请输入你的选择：")
    if name == "小明":
        students["小明"] += 1
    elif name == "小红":
        students["小红"] += 1
    elif name == "小白":
        students["小白"] += 1
    elif name == "小希":
        students["小希"] += 1
    count += 1
print("最终结果：")
for key, value in students.items():
    print("{}得到{}票 ".format(key,value))
    if value == max(students.values()):
        winner = key
print("{}为班长".format(winner))




